package com.internetCafes.spms.web.certificate.dao;

import com.internetCafes.spms.web.certificate.entity.CertificateRenewalInfo;
import com.internetCafes.spms.core.generic.GenericDao;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 证书延期信息
 * 
 * @author Sunny
 */
@Mapper
public interface CertificateRenewalInfoMapper extends GenericDao<CertificateRenewalInfo, Long>{

    /**
     * 通过证书id进行删除遗留数据
     *
     * @param certificateId 证书id
     * @return 删除
     */
    int deleteByCertificateId(Long certificateId);

    /**
     * 插入
     */
    int insert(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 批量插入
     */
    int insertBatch(List<CertificateRenewalInfo> certificateRenewalInfoList);

    /**
     * 选择插入
     */
    int insertSelective(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 按主键ID查询
     */
    CertificateRenewalInfo selectByPrimaryKey(Long id);

    /**
     * 按主键ID选择更新
     */
    int updateByPrimaryKeySelective(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 按主键ID更新
     */
    int updateByPrimaryKey(CertificateRenewalInfo certificateRenewalInfo);

    /**
     * 按参数查询
     */
    List<CertificateRenewalInfo> selectByParams(Map<String, Object> params);

    /**
     * 按参数查询数量
     */
    long countByParams(Map<String, Object> params);

    /**
     * 按主键ID删除
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 按主键ID批量删除
     */
    int deleteBatchByPrimaryKey(List<Long> ids);
	
}
